class CreateUsers < ActiveRecord::Migration
	
	def self.up				  
		create_table :users do |t|
			t.string :first_name
			t.string :last_name
			t.integer :matriculation_number
			t.string :email, null: false
			t.string :password_digest, null: false
			t.string :preferred_locale
			t.integer :user_group_id, null: false
			t.string :remember_token
			t.datetime :last_login
			t.string :created_by, null: false
			t.string :updated_by

			t.timestamps
		end

		add_index :users, :email, unique: true
		add_index :users, :remember_token, unique: true
		
		User.create_translation_table! about: :text
	end
	
	def self.down
		User.drop_translation_table!
		drop_table :users
	end
	
end
